<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-on指令</title>
    <script src="../vue.js"></script>
</head>
<body>
    <div id="app"> 
        <div v-on:mouseover="mouseMe()">{{msg}}</div>
        <button v-on:click="clickMe()">按钮1</button>
        <button @click="clickMe2()">按钮2</button>
        <button @mouseout="mouseOutMe()">按钮3</button>
    </div>
</body>
</html>
<script>
    var vm=new Vue({
        el:'#app',
        data:{
            msg:"Hello Vue"
        },
        methods:{
            clickMe:function(){
                window.alert("Hello Vue!");
            },
            mouseMe:function(){
                this.msg="Hello Giles";
            },
            clickMe2:function(){
                this.msg="Hello WNCD67";
            },
            mouseOutMe:function(){
                this.msg="我离开了，拜拜！";
            }
        }
    });
</script>